// pages/other/other.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    index: 0,
    system: ''
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var index = options.keyIndex - 0;
    var title = ''
    switch (index) {
      case 1:
        title = '消冰煮茗香，息驾寻真赏'
        break;
      case 2:
        title = '轻波戏鱼鸟，松间鸣好鸟'
        break;
      case 3:
        title = '客尘排妄情，服与代俱明'
        break;
      case 4:
        title = '手把杏花枝，机茵丹洞辟'
        break;
    }
    wx.setNavigationBarTitle({
      title: title
    })
    this.setData({
      index: index
    });
    var that = this;
    wx.getSystemInfo({
      success: res => {
        console.log(res);
        that.setData({
          system: res
        })
      }
    })
  },
})